<template>
  <view class="rollinng-list df fdr alc">
    <view
      @click.stop="jump(`/views/goods/goods_detail?id=${item.goods_id || item.order_goods_id}`)"
      class="item u-rela"
      v-for="(item, index) in list"
      :key="index"
    >
      <image class="pic" :src="item.goods_image"></image>
      <image v-if="url" class="label-icon" :src="url" mode="widthFix"></image>
      <view class="info">
        <view class="name u-line-2 lh-32 font-24">{{ item.goods_name }}</view>
        <view class="df fdr alc font-24">
          <view class="price u-m-r-8">
            ￥<text class="font-weight-500">{{ item.price }}</text>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    props: {
      list: {
        type: Array,
        default: () => [],
      },
      url: {
        type: String,
        default: '',
      },
    },
    data() {
      return {
        keyword: '',
      }
    },
  }
</script>

<style scoped lang="scss">
  .rollinng-list {
    width: 100%;
    overflow-x: auto;

    .item {
      width: 200rpx;
      margin-right: 16rpx;
      background: #fff;
    }

    .pic {
      width: 200rpx;
      height: 200rpx;
    }

    .pic-2 {
      width: 158rpx;
      height: 220rpx;
      background-color: var(--color);
    }

    .info {
      padding: 0rpx 20rpx;
    }

    .name {
      width: 160rpx;
      height: 60rpx;
      margin-bottom: 6rpx;
    }

    .price {
      color: var(--color);
    }
  }
</style>
